package com.drinks.yiniang.adapter.user.achievement;

import android.content.Context;
import android.support.annotation.Nullable;
import android.text.SpannableStringBuilder;
import android.text.Spanned;
import android.text.style.AbsoluteSizeSpan;

import com.chad.library.adapter.base.BaseViewHolder;
import com.drinks.yiniang.R;
import com.drinks.yiniang.adapter.base.BaseQuickRCVAdapter;
import com.drinks.yiniang.entity.user.achievement.AchievementJson;
import com.drinks.yiniang.entity.user.points.PointsExchangeJson;
import com.hansen.library.utils.ScreenSizeUtils;

import java.util.List;

/**
 * 成就列表adapter
 * @author han
 * @date 2019/8/30
 */
public class AchievementAdapter extends BaseQuickRCVAdapter<AchievementJson.AchievementList, BaseViewHolder> {

    private SpannableStringBuilder mBuilder;

    private int sp18;

    public AchievementAdapter(Context mContext, @Nullable List<AchievementJson.AchievementList> data) {
        super(R.layout.item_achievement, data);

        mBuilder = new SpannableStringBuilder();

        sp18 = ScreenSizeUtils.sp2Px(mContext, 18);
    }

    @Override
    protected void convert(BaseViewHolder helper, AchievementJson.AchievementList item) {
        mBuilder.clearSpans();
        mBuilder.clear();
    }
}
